# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=xsspy
pkgver=60.b10d336
pkgrel=3
pkgdesc='Web Application XSS Scanner.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
arch=('any')
url='https://github.com/faizann24/XssPy'
license=('custom:unknown')
depends=('python2' 'python2-mechanize')
makedepends=('git')
source=("$pkgname::git+https://github.com/faizann24/XssPy.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i '1 i\#!/usr/bin/python2' XssPy.py
}

package() {
  cd $pkgname

  install -Dm 755 XssPy.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

